export const curry = (fn: (...args: any[]) => any) => {
  let curriedFn: (...args: any[]) => any
  return (curriedFn = (...args) => {
    if (args.length < fn.length) {
      return (...args2: any) => {
        return curriedFn(...args, ...args2)
      }
    }
    return fn(...args)
  })
}
